﻿using SF.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace SF.Ucenter.admin.business
{
    public partial class frame : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Model.manager mgr = Session[DTKeys.SESSION_ADMIN_INFO] as Model.manager;
            if (mgr != null)
            {
                Session[DTKeys.SESSION_BUSNIESE_NUM] = mgr.busnieseNum;
                Session["UserName"] = mgr.real_name;
            }
            else 
            {
                Response.Redirect("../login.aspx");
            }
        }

        protected void lbtnExit_Click(object sender, EventArgs e)
        {
            Session[DTKeys.SESSION_BUSNIESE_NUM] = null;
            Session[DTKeys.SESSION_ADMIN_INFO] = null;
            Utils.WriteCookie("BusnieseName", "Busniese", -14400);
            Utils.WriteCookie("BusniesePwd", "Busniese", -14400);
            Response.Redirect("/admin/login.aspx");
        }
    }
}